<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>{$title}</title>   
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="description" content="{$description}">
        <meta name="keywords" content="{$keywords}">

        <!-- Base Css Files -->
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jqueryui/ui-lightness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/fontello/css/fontello.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/animate-css/animate.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/css/component.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/magnific-popup/magnific-popup.css" rel="stylesheet" /> 
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/styles/metro/notify-metro.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/pace/pace.css" rel="stylesheet" />
        
        <!-- Extra CSS Files -->
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/layer/skin/default/layer.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jquery-icheck/skins/all.css" rel="stylesheet" />
      	<link href="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-validator/css/bootstrapValidator.min.css" rel="stylesheet"/>
      	<link href="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
        
        
        <!-- Custom Css Files -->
        <link href="__PUBLIC_CSS__/reset.css" rel="stylesheet"  />
        <link href="__PUBLIC__/statics/coco-chat/assets/css/style.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/statics/coco-chat/assets/css/style-responsive.css" rel="stylesheet" />
        <link href="__HOME_CSS__/index.css"  rel="stylesheet" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="fixed-left login-page">
	<!-- Begin page -->
	<div class="container">
		<div class="full-content-center">
		<p class="text-center"><a href="#"><img src='<empty name="logo">__PUBLIC_IMAGES__/logo.png<else />{$logo}</empty>' alt="Logo" class="logo-img"></a></p>
			<div class="login-wrap animated flipInX">
				<div class="login-block">
				<p class="text-center logintitle">重置密码</p>
					<form role="form" id='vcode-form' action="{:U('Login/resetPwd')}">
					    <div class="form-group login-input">
					        <i class="fa fa-key overlay"></i>
			                <input type="password" class="form-control text-input" placeholder="新密码" name="password" id="password">
			            </div>
			            <div class="form-group login-input">
			                <i class="fa fa-key overlay"></i>
			            	<input type="password" name="conpassword" class="form-control text-input" placeholder="确认密码" id="conpassword" />
			            </div>
			            <div class="form-group">
							<button type="submit" class="btn btn-success btn-block">重 置</button>
						</div>
						<div class="form-group">
							<a href="{:U('Index/index')}" style="float: right;line-height:30px;">跳 过>></a>
						</div>
						<input type="hidden" name="user_no" value="{$user_no}" />
					</form>
				</div>
			</div>
			
		</div>
	</div>

	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery/jquery-1.11.1.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jqueryui/jquery-ui-1.10.4.custom.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-ui-touch/jquery.ui.touch-punch.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-detectmobile/detect.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/notify.min.js"></script>
    <script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/styles/metro/notify-metro.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/pace/pace.min.js"></script>
	
	<!-- Extra Js Files -->
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/layer/layer.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-icheck/icheck.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-validator/js/bootstrapValidator.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-select/bootstrap-select.min.js"></script>
    <script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-select2/select2.min.js"></script>
	
	<!-- Custom Js Files -->
	<script src="__PUBLIC_JS__/sha1.js"></script>
	<script src="__HOME_JS__/common.js"></script>
	
	<script>
	$(function(){
	
		$('#vcode-form').bootstrapValidator({
	        message: '验证不通过',
	        trigger: 'blur',
	        submitHandler: function(validator, form, submitButton) {
	        	var f_data = $('form').serializeArray();
				var data = {};
				$.each(f_data, function(i, field){
					if(field.name=='password' || field.name=='conpassword') {
						data[field.name] = hex_sha1(field.value);
					} else {
						data[field.name] = field.value;
					}
			  	});
	        	// 用ajax提交表单
		      	$.post(form.attr('action'), data, function(response) {
		      		//弹出提示
					layer.msg(response.message);
					
					if(response.status){
						notify("success",response.message);
						window.location.href = "{:U('Login/index')}";
					}else{
						notify("error",response.message);
					}
		        }, 'json');
	        },
	        fields: {
	        	password: {
	                validators: {
	                    notEmpty: {
	                        message: '不允许为空'
	                    }
	                }
	            },
	            conpassword: {
	                validators: {
	                    notEmpty: {
	                        message: '不允许为空'
	                    }
	                }
	            }
	        }
	    });
	});
	</script>
	<style type="text/css">
     .imgvcode{
     	cursor: pointer;width: 130px;position: relative;left: 185px;top: -37px;
     }
      .logintitle{font-size: 30px;margin-bottom: 18px;}
	</style>
	</body>
</html>